/**
 * 定义PLC设备详情模块
 */
(function(window, angular, undefined){
    var module = angular.module('water.apps.sw.bdPlcControl.device.bdPlcDeviceDetail', ['water.entity.bdPlcControl',
        'water.entity.protocol']);

    module.controller('bdPlcDeviceDetailController',function($scope,$stateParams,$bdPlcControlService){

        /**
         * 获取设备详情信息
         */
        $scope.getDeviceDetailInfo = function(){
            $bdPlcControlService.getDeviceDetailInfo($scope.queryObj).then(function(data){
                $scope.data = data;
            });
        }

        $scope._init = function(){
            $scope.queryObj = $stateParams.data;
            $scope.getDeviceDetailInfo();
        }

        $scope._init();
    });

}(window, angular));


